import axios from "./request";

// 获取视频分页
export const getVideos = (params) => {
    return axios({
        url: "/video/page",
        method: "GET",
        params: params
    })
}

// 获取视频列表
export const getVideoList = () => {
    return axios({
        url: "/video/list",
        method: "GET"
    })
}

// 通过id获取视频
export const getVideoById = (params) => {
    return axios({
        url: "/video/" + params,
        method: "GET"
    })
}

// 通过id删除视频
export const deleteVideoById = (params) => {
    return axios({
        url: "/video/" + params,
        method: "DELETE"
    })
}

// 批量删除视频
export const deleteVideoByIds = (params) => {
    return axios({
        url: "/video/batch",
        method: "DELETE",
        data: params
    })
}

// 修改视频
export const editVideo = (params) => {
    return axios({
        url: "/video/",
        method: "PUT",
        data: params
    })
}

// 添加视频
export const addVideo = (params) => {
    return axios({
        url: "/video/",
        method: "POST",
        data: params
    })
}
